<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%String path = request.getContextPath();%>
<jsp:include page="../../import.jsp" flush="true" />
<s:if test="oldPass.length()>1">
	<s:if test="cn == 1">
		<div class="ui-widget">
				<div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"> 
				<p>
					<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
					<strong>恭喜，密码修改成功！5秒后将自动重新登录....</strong>
				</p>
				</div>
		</div>
		<SCRIPT LANGUAGE="JavaScript">
			var reload = function(){
				location.href = "<%=path%>/security/loginOut.action";
			}
			setTimeout(reload,5000);
		</SCRIPT>
	</s:if>
	<s:if test="cn == 0">
		<div class="ui-widget">
				<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> 
				<p>
					<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
					<strong>对不起，密码没有修改成功；请重新输入... ...</strong>
				</p>
				</div>
		</div>
	</s:if>
</s:if>
<FORM METHOD='GET' ACTION="<%=path%>/security/editPass.action" >
	<INPUT TYPE="hidden" NAME="index" value="editPassWord">
	<INPUT TYPE="hidden" NAME="loginname" value='<s:property value="#session.QDEVELOP_LOGIN_SESSION_KEY.loginName"/>'>
	<TABLE>
	<TR align="right">
		<TD>原始密码：</TD>
		<TD><INPUT TYPE="password" id="oldPass"  NAME="oldPass"  size="16"></TD>
	</TR>
	<TR align="right">
		<TD>新密码：</TD>
		<TD><INPUT TYPE="password" id="newPass" name="newPass" size="16" ></TD>
	</TR>
	<TR align="right">
		<TD>重复新密码：</TD>
		<TD><INPUT TYPE="password" id="repetPass" size="16"></TD>
	</TR>
	<TR align="right">
		<TD colspan="2"><input TYPE="button" value="修改密码" onclick="checkAndSubmit();"></TD>
	</TR>
	</TABLE>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
	var checkAndSubmit = function(){
		if($('#newPass').val() == $('#repetPass').val()){
			if(confirm('确定修改密码？')){
				wait.show();
				$('FORM').submit();
			}
		}else{
			alert('-_-!，您两次输入的新密码不一样，不能提交，请重新输入');
			$('#repetPass').val('');
			$('#newPass').val('')
		}
	}
</SCRIPT>